#include "devicesform.h"
#include "nofocusdelegate.h"

#include <QListWidgetItem>
#include <QLabel>
#include <QListWidget>
#include <QPushButton>
#include <QVBoxLayout>

DevicesForm::DevicesForm(QWidget *parent) :
    QWidget(parent)
{
    setObjectName("DevicesForm");

    QLabel *titleLabel=new QLabel("Host Devices");
    titleLabel->setAlignment(Qt::AlignCenter);
    m_pSearchButton=new QPushButton("Search");
    m_pSearchButton->setObjectName("m_pSearchButton");
    m_pListWidget=new QListWidget;
    m_pListWidget->setItemDelegate(new NoFocusDelegate());

    QVBoxLayout *layout=new QVBoxLayout;
    layout->setMargin(0);
    layout->setSpacing(0);
    layout->addWidget(titleLabel);
    layout->addWidget(m_pSearchButton);
    layout->addWidget(m_pListWidget);

    setLayout(layout);

    for(int i=0;i<10;i++)
    {
        QListWidgetItem *item=new QListWidgetItem;
        item->setText(QString::number(i));

        m_pListWidget->addItem(item);
    }
}

DevicesForm::~DevicesForm()
{
}
